<template>
  <div>
    <div class="item-info">
      <div
        :class="['single-item', item.flag ? 'active-item' : '']"
        v-for="(item, index) in singleItemList"
        :key="index"
      >
        <div>{{ item.name }}</div>
        <div class="item-logo">
          <img :src="item.logo" alt="" />
        </div>
      </div>
      <div class="single-item-info">
        <div class="info-line1">
          <div>{{ gameTitle }}</div>
          <div class="venue">{{ venueName }}</div>
        </div>
        <div class="info-line2">
          <div class="report-name">综合成绩公告</div>
          <div>{{ gameTime }}</div>
        </div>
      </div>
    </div>

    <div class="score-table-data" style="width: 100%;">
      <el-table
        :data="tableData"
        style="width: 100%"
        border
        :header-cell-style="{ 'text-align': 'center' }"
        :cell-style="{ 'text-align': 'center' }"
      >
        <template v-for="(item, index) in tableHeader">
          <el-table-column :label="item.label" :prop="item.prop"></el-table-column>
        </template>
      </el-table>
    </div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  created() {
    this.venueName = this.$route.query.venueName
    this.gameTime = this.$route.query.gameTime
    this.gameTitle = this.$route.query.gameTitle
  },
  props: {},
  data() {
    return {
      tableHeader: [
        { prop: 'Rank', label: '名次' },
        { prop: 'Name', label: '姓名' },
        { prop: 'Team', label: '单位' },
        { prop: 'Score', label: '积分' },
        { prop: 'HB1', label: '对手分' },
        { prop: 'HB2', label: '中间分' },
        { prop: 'WinCount', label: '赢棋数' }
      ],
      tableData: [
        {
          Rank: '1',
          Name: ' 王珂苗 (21)  ',
          Team: '宁波  ',
          Score: '7',
          HB1: '49.5',
          HB2: '39.5',
          WinCount: '6'
        }
      ],
      venueName: '',
      gameTime: '',
      gameTitle: '',
      singleItemList: [
        {
          name: '五子棋',
          logo: require('../../assets/img/daily/GB.png'),
          flag: true
        }
      ]
    }
  },
  watch: {},
  computed: {},
  filters: {},
  components: {},
  methods: {}
}
</script>
<style scoped lang="scss">
@import '@/assets/scss/item.scss';
</style>
